home *** CD-ROM | disk | FTP | other *** search
- /*************************************************************************************
- TEnemySprite.h
-
- This is the class used to represent the enemy ship in the game. Eventually,
- one ship class will represent both friendly and enemy ships, since the only
- major difference is the keyset. A computer controlled ship could be
- different.
-
-
- Author: Timothy Carroll
- Apple Developer Technical Support
- timc@apple.com
-
- Modification History:
-
- 8/15/96 TMC Initial Release
-
- Copyright © 1996 Apple Computer, Inc., All Rights Reserved
-
-
- You may incorporate this sample code into your applications without
- restriction, though the sample code has been provided "AS IS" and the
- responsibility for its operation is 100% yours. However, what you are
- not permitted to do is to redistribute the source as "DSC Sample Code"
- after having made changes. If you're going to re-distribute the source,
- we require that you make it clear in the source that the code was
- descended from Apple Sample Code, but that you've made changes.
- *************************************************************************************/
-
- #ifndef _TENEMYSPRITE_
- #define _TENEMYSPRITE_
-
- #pragma once
- #include "TSprite.h"
-
- #if PRAGMA_STRUCT_ALIGN
- #pragma options align=power
- #endif
-
-
- struct TEnemySpriteData
- {
- TSpriteData spriteData;
- SInt16 rotateInterval; // turning rate;
- SInt16 shotInterval; // firing rate;
- TSpriteCollection *shotsGroup; // where my shots should be added.
- };
-
- typedef struct TEnemySpriteData **TEnemySpriteDataHandle;
-
- class TEnemySprite : public TSprite
- {
-
- public:
-
- enum {
- kSpriteType = 'BADG'
- };
-
- TEnemySprite (TEnemySpriteData *data);
- ~TEnemySprite (void);
-
- virtual void ProcessSprite (void);
- virtual void Collision (TSprite *theSprite);
-
- protected:
- SInt16 fRotateInterval;
- SInt16 fRotateValue;
- SInt16 fShotInterval;
- SInt16 fShotValue;
- TSpriteCollection *fShotsGroup; // where my shots should be added.
- };
-
- #if PRAGMA_STRUCT_ALIGN
- #pragma options align=reset
- #endif
-
-
- #endif /* _TENEMYSPRITE_ */